package com.pacai.constructor;

public class ConstructorDetail {
    public static void main(String[] args) {
        Dog dog = new Dog();
        Dog dog2 = new Dog("dog");

    }
}


class Dog{
    public String name;
    public int age;
    public Dog(){

    }
    public Dog(String name,int age){
        this(name);
        this.age = age;
    }

    public Dog(String name){
        this.name = name;
    }
}
